package com.moyuwanjia.service.Impl;

import com.moyuwanjia.Dao.IAccountDao;
import com.moyuwanjia.entity.Account02;
import com.moyuwanjia.service.IAccountService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 摸鱼丸加~
 * @create 2022-04-24 11:08
 * 将当前类交由spring来管理
 */
@Service(value = "IAccountServiceImpl")
public class IAccountServiceImpl implements IAccountService {
    @Resource
    private IAccountDao accountDao;

    public List<Account02> findAll() {
        return accountDao.findAll();
    }

    public Account02 findAccountById(Integer id) {
        return accountDao.findAccountById(id);
    }

    public void saveAccount(Account02 account02) {
        accountDao.saveAccount(account02);
    }

    public void updateAccount(Account02 account02) {
        accountDao.updateAccount(account02);
    }

    public void deleteAccountById(Integer id) {
        accountDao.deleteAccountById(id);
    }
}
